package mutsumimod.cards.deprecated;

import basemod.AutoAdd;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.StrengthPower;
import mutsumimod.cards.BaseCard;
import mutsumimod.character.Mutsumi;
import mutsumimod.monitors.SakiDownMonitor;
import mutsumimod.powers.StandPower;
import mutsumimod.util.CardStats;

@Deprecated
@AutoAdd.Ignore
public class SakiDown extends BaseCard {
    public static final String ID = makeID(SakiDown.class.getSimpleName());
    public static final CardStats info = new CardStats(
            Mutsumi.Meta.CARD_COLOR,
            CardType.SKILL,
            CardRarity.UNCOMMON,
            CardTarget.SELF,
            1
    );

    public SakiDown() {
        super(ID, info);
        setAttr(0,0,0);
        setAttrUpg(0,0,0);
        selfRetain=true;
        setCustomVar("SR",SakiDownMonitor.standReduceThisTurn);
        updateDescription();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        int amount=SakiDownMonitor.standReduceThisTurn;
        if(amount>0){
            applyPowerSelf(new StandPower(p, amount),amount);
            applyPowerSelf(new StrengthPower(p,amount),amount);
        }
    }

    @Override
    public AbstractCard makeCopy() {
        return new SakiDown();
    }

    @Override
    public void updateDescription() {
        if(AbstractDungeon.player==null){
            rawDescription=cardStrings.DESCRIPTION;
        }else{
            rawDescription=cardStrings.DESCRIPTION+cardStrings.EXTENDED_DESCRIPTION[0];
        }
        initializeDescription();
    }

    @Override
    public void upgrade() {
        if(!upgraded){
            upgradeName();
            upgradeBaseCost(baseCost-1);
        }
    }


}
